﻿using System;
using System.Collections.Generic;
using Allegro.Framework;

//using System.Linq;
//using System.Text;

namespace Allegro.Mathlib
{
    /// <summary>
    /// Variable binding for an equation variable
    /// </summary>
    public class VariableBinding
    {
        int _varIndex;

        public VariableBinding(string varId)
        {
            Compute = null;
            //SetValue = null;
            VariableId = varId;
            _varIndex = -1;
        }
 
        /// <summary>
        /// Method of computation used for the variable
        /// </summary>
        public ComputationMethod ComputationMethod;

        /// <summary>
        /// Compute the variable directly
        /// </summary>
        public ContextComputation Compute;

        /// <summary>
        /// Id of the variable
        /// </summary>
        public string VariableId;

        /// <summary>
        /// Index of the variable in variable arrays or lists
        /// </summary>
        public int VarIndex
        {
            get { return _varIndex; }
            internal set { _varIndex = value; }
        }
    }
}
